<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {include file="common/head_static" /}
</head>
<body>
<div class="layui-container" style="margin-top: 10px;">
    <div class="layui-row">
        <button class="btn btn-primary" type="button" onclick="add()">添加房间</button>
        <table class="table table-hover">
            <thead>
            <tr>
                <th>房间名称</th>
                <th>房间号</th>
                <th>价格</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>标准间</td>
                <td>101</td>
                <td>500元</td>
                <td>
                    <a href="#"class="btn btn-primary">编辑</a>
                    <a href="#"class="btn btn-primary">删除</a>
                </td>
            </tr>
            <tr>
                <td>标准间</td>
                <td>1021</td>
                <td>5020元</td>
                <td>
                    <a href="#"class="btn btn-primary">编辑</a>
                    <a href="#"class="btn btn-primary">删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
</body>
<script>
    function add(){
        $.ajax({
            type:"get",
            url: "{:url('admin/system/add_house')}",
            data: {
            },
            //回调函数
            success: function(data){
                layer.open({
                    title:'添加房间',
                    type: 1,
                    skin: 'layui-layer-lan', //加上边框
                    anim: 4,
                    area: ['300px', '200px'], //宽高
                    content: data
                });
            }});
    }
</script>
</html>